#ifndef QJSCANWORDVIEW_H
#define QJSCANWORDVIEW_H

#include <QWidget>
#include "qjscanworddocument.h"

class QJScanwordView : public QWidget
{
    Q_OBJECT
public:
    explicit QJScanwordView( QJScanwordDocument &jsDoc, QWidget *parent=0);
    void paintEvent(QPaintEvent *pe);
    void setSizeSquare(const int sizeSq)
    {
        m_sizeSquare = (sizeSq >= 15)? sizeSq: 15;
    }

protected:
    virtual void mousePressEvent(QMouseEvent*);
    virtual void mouseMoveEvent(QMouseEvent*);

signals:

private:

    QPoint lastPos;
    QJScanwordDocument *m_jsDocument;
    QPainter painter;
    QPen pen;
    int m_sizeSquare;
    int m_offset_x;
    int m_offset_y;
    void setCross(QRect);
    void setFill(QRect);
public slots:
    void clearMatrix();
    void checkMatrix();
};

#endif // QJSCANWORDVIEW_H
